﻿using System.Data;

namespace Marmat.Forms.Views.DataGrid
{
    public class CustomRowCellEditEventArgs : Grid.CustomRowCellEditEventArgs
    {
        internal CustomRowCellEditEventArgs(Forms.DataGrid gridControl, Grid.CustomRowCellEditEventArgs eventArgs) : base(gridControl, eventArgs.args)
        {
        }

        /// <summary>
        /// 返回当前的表格控件
        /// </summary>
        /// <returns></returns>
        public new Forms.DataGrid GridControl
        {
            get
            {
                return (Forms.DataGrid)base.GridControl;
            }
        }

        /// <summary>
        /// 获取当前行。
        /// </summary>
        /// <returns></returns>
        public new Row Row
        {
            get
            {
                DataRowView RowView = (DataRowView)base.Row;
                var dr = new Row(this.GridControl, RowView.Row);
                return dr;
            }
        }
    }
}